package com.qqtop10.manager.service.impl;

import com.qqtop10.manager.model.User;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qqtop10.manager.dao.UserMapper;
import com.qqtop10.manager.model.PagingArgs;
import com.qqtop10.manager.service.UserService;

@Service("userService")
public class UserServiceImpl extends BaseService implements UserService {
	@Autowired
	private UserMapper userMapper;

	@Override
	public List<User> all(User input, PagingArgs pagingArgs) {
		return userMapper.all(asMap(input, pagingArgs));
	}

	@Override
	public int count(User input) {
		return userMapper.count(input);
	}

	@Override
	public int insert(User record) {
		return userMapper.insert(record);
	}

	@Override
	public int insertSelective(User record) {
		return userMapper.insertSelective(record);
	}

	@Override
	public User selectByAccount(String userid) {
		return userMapper.selectByAccount(userid);
	}

	@Override
	public User selectByUuid(String uuid) {
		return userMapper.selectByUuid(uuid);
	}

	@Override
	public int updateByUserUuid(User record) {
		return userMapper.updateByUserUuid(record);
	}

	@Override
	public int accountCount(String account) {
		return userMapper.accountCount(account);
	}

	@Override
	public int accountIsExist(String account) {
		return userMapper.accountIsExist(account);
	}

	@Override
	public int phoneIsExist(String cellphone) {
		return userMapper.phoneIsExist(cellphone);
	}
	
	@Override
	public User getLastTp() {
		return userMapper.getLastTp();
	}
}
